@Service public class SpringUtils extends Object implements org.springframework.context.ApplicationContextAware
| Constructor and Description |
|---|
SpringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
autowire(Class<T> type) |
static org.springframework.context.ApplicationContext |
getApplicationContext() |
static <T> T |
getBean(Class<T> type) |
static Object |
getBean(String name) |
static <T> T |
getBean(String name,
Class<T> type) |
static org.springframework.beans.factory.config.AutowireCapableBeanFactory |
getBeanFactory() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic static org.springframework.context.ApplicationContext getApplicationContext()
public static Object getBean(String name) throws org.springframework.beans.BeansException
org.springframework.beans.BeansExceptionpublic static <T> T getBean(String name, Class<T> type) throws org.springframework.beans.BeansException
org.springframework.beans.BeansExceptionpublic static <T> T getBean(Class<T> type) throws org.springframework.beans.BeansException
org.springframework.beans.BeansExceptionpublic static org.springframework.beans.factory.config.AutowireCapableBeanFactory getBeanFactory()
public static <T> T autowire(Class<T> type)
Copyright © 2024. All rights reserved.